package org.geektimes.reactive.message.streams;

import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;

/**
 * @Author: jipeng
 * @Description:
 * @Date: Created in 2021/4/6 8:33
 */
public class DefaultSubscription implements Subscription {

    private  boolean canceled = false;
    private  final Subscriber subscriber;

    public DefaultSubscription(Subscriber subscriber) {
        this.subscriber = subscriber;
    }


    @Override
    public void request(long l) {

    }

    @Override
    public void cancel() {
        this.canceled = true;
    }


    public boolean isCanceled() {
        return canceled;
    }

    public Subscriber getSubscriber() {
        return subscriber;
    }
}
